#include "graphsupport/solve/facilitylocation/CompoundFacilitiesSolver.h"

bool CompoundFacilitiesSolver::solve(
	FacilitiesGraph & fgraph,
	std::vector< char > & isFacilityOpenVec,
	std::vector< int > & cityWitnessVec
)
{
	bool result = false;
	for (
		std::vector< IFacilityLocationSolverPtr >::iterator it = subSolversVec.begin();
		it != subSolversVec.end();
		++it )
	{
		result = ( * it )->solve( fgraph, isFacilityOpenVec, cityWitnessVec );
	}

	return result;
}

void CompoundFacilitiesSolver::addSubSolver( const IFacilityLocationSolverPtr & subSolver )
{
	subSolversVec.push_back( subSolver );
}


